﻿@using Whatsnexx.Models
@model WhatsnexxPart


<fieldset>
    <legend>@T("Whatsnexx")</legend>
    
    <div>
        <label for="@Html.FieldIdFor(m => m.SubjectTypeId)">@T("Subject Type Id")</label>
        @Html.TextBoxFor(m => m.SubjectTypeId, new { @class = "textMedium" })
          <span class="Whatsnexxhelps"></span>
        <span>@T("Please enter the subject type GUID")</span>
    </div>

    <div>
        <label for="@Html.FieldIdFor(m => m.SubjectCode)">@T("Subject Code field name")</label>
        @Html.TextBoxFor(m => m.SubjectCode)
         <span class="Whatsnexxhelps"></span>
        <span>@T("Please enter the field name you want to use for subject code")</span>
    </div>
    <div>
        <label for="@Html.FieldIdFor(m => m.Environment)">@T("Target Execution Environment")</label>
        @Html.DropDownList("Environment", new[] { 
                                    new SelectListItem { Text = "Production", Value = "Production", Selected = Model.Environment =="Production" },
                                    new SelectListItem { Text = "Stage", Value = "Stage",Selected = Model.Environment =="Stage" }}) 
        <span class="Whatsnexxhelps"></span>
        <span>@T("Please enter the execution environment you want to target")</span>

    </div>
    <div>
        <label for="@Html.FieldIdFor(m => m.EventName)">@T("Event Name")</label>
        @Html.TextBoxFor(m => m.EventName)
          <span class="Whatsnexxhelps"></span>
        <span>@T("Please enter the connect name of the event you want to send to the Whatsnexx Ticket Bus")</span>
    </div>
</fieldset>


@{
    Style.Require("AdminWhatsnexx");
    Style.Require("AdminHelptooltip"); 
}


@using (Script.Foot())
{
    <script type="text/javascript">
    //<![CDATA[
        (function ($) {
            $(document).ready(function () {
                $(".Whatsnexxhelps").helptooltip();
            });

            $.fn.helptooltip = function () {
                $("body").append('<div id="Whatsnexxbubble_tooltip" style="display: none; left: 379px; top: 62px;"><div class="Whatsnexxbubble_top"></div><div class="Whatsnexxbubble_middle"><span id="Whatsnexxbubble_tooltip_content">&nbsp;</span></div><div class="Whatsnexxbubble_bottom"></div></div>');
                $(this).each(function () {
                    var ht = $(this).next('span').html();
                    $(this).next('span').html('&nbsp;&nbsp;&nbsp;<img onmouseout="$(\'#Whatsnexxbubble_tooltip\').hide();" onmouseover="Whatsnexxshowme(\'' + ht + '\', this);" src="@Url.Content("~/Modules/Whatsnexx/Styles/images/b_tipp.gif")" alt="" />').show();
                });
            }
        })(jQuery);

        function Whatsnexxshowme(txt, me) {
            jQuery("#Whatsnexxbubble_tooltip_content").html(txt);
            jQuery("#Whatsnexxbubble_tooltip").css({ display: 'block', top: jQuery(me).offset().top - jQuery("#Whatsnexxbubble_tooltip").height() + 5, left: jQuery(me).offset().left - (jQuery("#Whatsnexxbubble_tooltip").width() - 50) });
        }

	//]]>
    </script>
    
}
   